package com.ws.service;

import com.ws.bean.Depart;
import com.ws.dao.DepartDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DepartService {

    @Autowired
    private DepartDao departDao;

    public List<Depart> findByStatus(String dstatus) {

        return departDao.findByStatus(dstatus);
    }

    public void addDepart(String dname, String duty) {
        departDao.addDepart(dname, duty);
    }

    public Depart findByDid(String did) {
        return departDao.findByDid(did);
    }

    public void updateDepart(Depart depart) {
        departDao.updateDepart(depart);
    }


    public void updateDstatus(int did, int dstatus) {
        departDao.updateDstatus(did, dstatus);
    }
}
